<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use common\models\Category;
use common\models\Vote;
/* @var $this yii\web\View */
/* @var $model common\models\VotePlayerSearch */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
  <div class="panel panel-default">
    <div class="panel-heading" role="tab" id="headingOne">
      <h4 class="panel-title">
        <a data-toggle="collapse" style="display:block" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
            查询
        </a>
      </h4>
    </div>
    <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
      <div class="panel-body">
    <?php $form = ActiveForm::begin([
        'action' => ['index'],
        'method' => 'get',
    ]); ?>

    <?= $form->field($model, 'cid')->dropDownlist(
        ArrayHelper::map(Category::find()->all(), 'id', 'title'),
        ['prompt' => '选择分类']
    ) ?>

    <?= $form->field($model, 'vid')->dropDownlist(
        ArrayHelper::map(Vote::find()->all(), 'id', 'title'),
        ['prompt' => '选择活动']
    ) ?>

    <?= $form->field($model, 'title') ?>

    <?php // echo $form->field($model, 'digest') ?>

    <?php // echo $form->field($model, 'thumb') ?>

    <?php // echo $form->field($model, 'votes') ?>

    <?php // echo $form->field($model, 'created_at') ?>

    <?php // echo $form->field($model, 'updated_at') ?>

    <div class="form-group">
        <?= Html::submitButton('查询', ['class' => 'btn btn-primary']) ?>
        <?= Html::resetButton('重置', ['class' => 'btn btn-default']) ?>
    </div>

    <?php ActiveForm::end(); ?>
      </div>
    </div>
  </div>
</div>
